/*===== code build by mstore0.1.3 =====*/

/*===== zhbManageSystem/modifyPassword#main:0 =====*/
$(function(){
    $('.submitNewPassword').click(function(){
        var oldPsw = $('.modifyPassword input[name=oldPsw]').val();
        var newPsw = $('.modifyPassword input[name=newPsw]').val();
        var againPsw = $('.modifyPassword input[name=againPsw]').val();
        
        if(!oldPsw){
            return alert('原密码不能为空');
        }else if(!newPsw){
            return alert('新密码不能为空');
        }
        
        if(newPsw != againPsw){
            return alert('密码不一致');
        }
        
        $$.post('modifyPassword.json', function(resp){
            if(resp.err){
                alert(resp.err);
            }else{
                alert('修改成功');
                location.reload();
            }
        },{oldPsw:oldPsw, newPsw:newPsw});
    })
})
